package com.angel.architecture.daos.impl;

import com.angel.architecture.daos.CountryDAO;
import com.angel.architecture.persistence.beans.Country;
import com.angel.architecture.persistence.ids.ObjectId;
import com.angel.dao.generic.impl.GenericSpringHibernateDAO;

/**
 *
 * @author William
 * @since 08/April/2009
 *
 */
public class CountrySpringHibernateDAO extends GenericSpringHibernateDAO<Country, ObjectId> implements CountryDAO {

    public CountrySpringHibernateDAO(){
        super(Country.class, ObjectId.class);
    }

	public Country findUniqueByCode(String code) {
		return super.findUnique("code", code);
	}

	public Country findUniqueByName(String name) {
		return super.findUnique("name", name);
	}

	public Country findUniqueOrNullByName(String name) {
		return super.findUniqueOrNull("name", name);
	}

	public Country findUniqueByShortCode(String shortCode) {
		return super.findUnique("shortCode", shortCode);
	}
}
